class Scene {
  constructor(aParent, aOpenID, aName){
    this.parent = aParent
    this.openid = aOpenID
    this.name = aName
  }
  update(){
    let nxt = this.next_stage
    this.next_stage = ""
    return {scene: nxt, param: this.next_stage_param}
  }

  toNextScene(aName, aParam){
    this.next_stage = aName
    this.next_stage_param = aParam
  }

  async render(ctx){
    ctx.clearRect(0, 0, canvas.width, canvas.height, this.first_render)
    this.first_render = false
  }
  
  async enter(param){
    this.first_render = true
  }

  leave(){

  }
}

export default Scene